import request from '@/utils/request'

// 查询考核任务分页
export function pageTask(query) {
  return request({
    url: '/examine/task/page',
    method: 'get',
    params: query,
    factoryId:true,
  })
}

// 查询考核任务列表
export function listTask(query) {
  return request({
    url: '/examine/task/list',
    method: 'get',
    params: query,
    factoryId:true
  })
}

// 查询考核任务详细
export function getTask(id) {
  return request({
    url: '/examine/task/info/' + id,
    method: 'get'
  })
}

// 新增考核任务
export function addTask(data) {
  return request({
    url: '/examine/task',
    method: 'post',
    data: data,
    factoryId:true,
  })
}

// 修改考核任务
export function updateTask(data) {
  return request({
    url: '/examine/task',
    method: 'put',
    data: data
  })
}

// 删除考核任务
export function delTask(data) {
  return request({
    url: '/examine/task/remove/batch',
    method: 'delete',
    data
  })
}

// 导出考核任务
export function exportTask(query) {
  return request({
    url: '/examine/task/export',
    method: 'get',
    params: query
  })
}

// 下载模板考核任务
export function downImportTemplate() {
  return request({
    url: '/examine/task/importTemplate',
    method: 'get'
  })
}

// 考核任务填报
export function associationTask(data) {
  return request({
    url: '/examine/associationTask',
    method: 'post',
    data: data,
  })
}